home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 January
/
PCWorld_2007-01_cd.bin
/
v cisle
/
autoit
/
autoit-v3.2.0.1-setup.exe
/
Examples
/
Helpfile
/
GUICtrlCreateButton.au3
< prev
next >
Wrap
Text File
|
2006-06-17
|
725b
|
23 lines
#include <GUIConstants.au3>
GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered
Opt("GUICoordMode",2)
$Button_1 = GUICtrlCreateButton ("Run Notepad", 10, 30, 100)
$Button_2 = GUICtrlCreateButton ( "Button Test", 0, -1)
GUISetState () ; will display an dialog box with 2 button
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
Run('Notepad.exe') ; Will Run/Open Notepad
Case $msg = $Button_2
MsgBox(0, 'Testing', 'Button 2 was pressed') ; Will demonstrate Button 2 being pressed
EndSelect
Wend